package com.medvalley.tcm.base;

public enum QuestionType {
    BODY(11,"体质辨识"),
    ANXIETY(21,"焦虑"),
    DEPRESSION(22, "抑郁"),
    TIRED(23,"疲劳"),
    XINLI(24,"心理压力"),
    SHIMIAN(25,"失眠");
    private int code;
    private String desc;

    QuestionType(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc (int code) {
        for(QuestionType qt : QuestionType.values()){
            if (qt.code == code) {
                return qt.desc;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }
}
